package com.ray.bean;

import lombok.Getter;
import lombok.Setter;

/**
 * 备份订单信息修改记录Bean
 * @author libin
 *
 */
@Setter
@Getter
public class DuplicateOrderUpdateRecordBean {
	
	//id
	private int id;
	//订单编号
	private String orderId;
	//行号
	private Integer lineNo;
	//物料类型
	private String materialType;
	//仓位
	private Integer materialFactory;
	//修改人Id
	private String updateUserId;
	//修改人名称
	private String updateUserName;
	//修改时间
	private String updateTime;
	//公司
	private String company;
	
	//可能被修改的数据
	//原物料规格
	private String oldMaterialModel;
	//原色号
	private String oldColor;
	//原颜色描述
	private String oldColorDescription;
	//原物料代码
	private String oldMaterialCode;
	//修改后的物料规格
	private String materialModel;
	//修改后的色号
	private String color;
	//修改后的颜色描述
	private String colorDescription;
	//修改后的物料代码
	private String materialCode;
	//是否为物料清单修改备份记录
	private Integer isBom;
	//该修改内容是否审核
	private Integer isApproval;
	//订单编号id
	private String orderDetailId;
	//是否可审核
	private Integer canApproval;
	
	public DuplicateOrderUpdateRecordBean() {};
	public DuplicateOrderUpdateRecordBean(OrderInfoDetailBean order,OrderInfoDetailBean updateAfterOrder) {
		this.setOrderId(order.getOrderNo());
		this.setMaterialType(order.getMaterialType());
		this.setMaterialFactory(Integer.valueOf(order.getMaterialFactory()));
		this.setLineNo(Integer.valueOf(order.getLineNo()));
		//修改后数据
		this.setMaterialModel(updateAfterOrder.getMaterialModel());
		this.setColor(updateAfterOrder.getColor());
		this.setColorDescription(updateAfterOrder.getColorDescription());
		this.setMaterialCode(updateAfterOrder.getMaterialCode());
		//修改前数据
		this.setOldMaterialModel(order.getMaterialModel());
		this.setOldColor(order.getColor());
		this.setOldColorDescription(order.getColorDescription());
		this.setOldMaterialCode(order.getMaterialCode());
	};
	
}
